package com.pro.service.imple;

import com.pro.mapper.JsUserCouponMapper;
import com.pro.mapper.JsUserMapper;
import com.pro.pojo.JsBeforeUser;
import com.pro.pojo.JsUser;
import com.pro.pojo.JsUserCoupon;
import com.pro.pojo.JsUserCouponUsed;
import com.pro.service.JsUserCouponService;
import com.pro.service.JsUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JsUserCouponServiceImple implements JsUserCouponService {

    @Autowired
    private JsUserCouponMapper jsUserCouponMapper;

    @Override
    public List<JsUserCoupon> getJsUserCouponList(JsUserCoupon jsUserCoupon) {
        return jsUserCouponMapper.getJsUserCouponList(jsUserCoupon);
    }

    @Override
    public List<JsUserCoupon> getJsUserCouponRetrieval(JsUserCoupon jsUserCoupon) {
        return jsUserCouponMapper.getJsUserCouponRetrieval(jsUserCoupon);
    }

    @Override
    public boolean updateJsUserCouponOnline(JsUserCoupon jsUserCoupon) {
        return jsUserCouponMapper.updateJsUserCouponOnline(jsUserCoupon);
    }

    @Override
    public boolean deleteJsUserCoupon(Integer couponId) {
        return jsUserCouponMapper.deleteJsUserCoupon(couponId);
    }

    @Override
    public List<JsBeforeUser> getJsUserCoupon(JsBeforeUser jsBeforeUser) {
        return jsUserCouponMapper.getJsUserCoupon(jsBeforeUser);
    }

    @Override
    public Integer getJsUserCouponState(Integer usedState, Integer userId) {
        return jsUserCouponMapper.getJsUserCouponState(usedState,userId);
    }

    @Override
    public List<String> getJsUserCouponEnd(Integer userId) {
        return jsUserCouponMapper.getJsUserCouponEnd(userId);
    }

    @Override
    public boolean addJsUserCouponUsed(JsUserCouponUsed jsUserCouponUsed) {
        return jsUserCouponMapper.addJsUserCouponUsed(jsUserCouponUsed);
    }

    @Override
    public boolean updateJsUserCouponUsed(Integer couponId) {
        return jsUserCouponMapper.updateJsUserCouponUsed(couponId);
    }

    @Override
    public Integer getJsUserCouponSurplus(Integer couponId) {
        return jsUserCouponMapper.getJsUserCouponSurplus(couponId);
    }

    @Override
    public boolean addJsUserCoupon(JsUserCoupon jsUserCoupon) {
        return jsUserCouponMapper.addJsUserCoupon(jsUserCoupon);
    }

    @Override
    public List<Integer> getJsUserCouponCode() {
        return jsUserCouponMapper.getJsUserCouponCode();
    }

    @Override
    public String getJsUserCouponEndDate(Integer couponId) {
        return jsUserCouponMapper.getJsUserCouponEndDate(couponId);
    }


}
